<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var arr = [1,2,3]
        /* instanceof  判断一个对象是不是某个类的实例 */
        console.log(arr instanceof Array);

        function Person(name,age){
            this.name = name
            this.age = age
        }
        var p = new Person("zheng",18)
        console.log(p instanceof Person);

        /* 
        1.类   构造函数
        2.对象  实例(new)
        3.原型对象  Array.prototype
        4.原型链   __proto__
        5. instanceof
         */

        var p = new Promise((resolve,reject)=>{
            resolve(1)
            reject(2)
        })
        console.log(p instanceof Promise);
    </script>
</body>
</html>